<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改用户通道')" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-userChannel-edit" th:object="${tUserChannel}">
            <input name="id" th:field="*{id}" type="hidden">
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label is-required">商户编码：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="userId" th:field="*{userId}" class="form-control" type="text" required>-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">通道类型：</label>
                <div class="col-sm-8">
                    <select name="type"  class="form-control" th:with="type=${@dict.getType('channel_type')}" disabled>
                        <option value="">所有</option>
                        <option th:each="dict : ${type}" th:field="*{type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">通道编码：</label>
                <div class="col-sm-8">
                    <input name="channel" th:field="*{channel}" class="form-control" type="text" readonly required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商户费率：</label>
                <div class="col-sm-8">
                    <input name="userRate" th:field="*{userRate}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否禁用：</label>
                <div class="col-sm-8">
                    <select name="disabled"  class="form-control" th:with="type=${@dict.getType('yes_or_no')}">
                        <option value="">所有</option>
                        <option th:each="dict : ${type}" th:field="*{disabled}"  th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js" />

    <script th:inline="javascript">
        var prefix = ctx + "business/userChannel";
        $("#form-userChannel-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-userChannel-edit').serialize());
            }
        }
    </script>
</body>
</html>